package com.bjsxt.spring;

public class Client {

	public static void main(String[] args) {
		UserManager userManager = (UserManager) new CGLibProxy()
				.createProxyObject(new UserManagerImpl());
		System.out.println("-----------CGLibProxy-------------");
		userManager.addUser("Macower", "root");
		System.out.println("-----------JDKProxy-------------");
		JDKProxy jdkPrpxy = new JDKProxy();
		UserManager userManagerJDK = (UserManager) jdkPrpxy
				.newProxy(new UserManagerImpl());
		userManagerJDK.addUser("Macower", "root");

	}
}
